package adapter
/*
// general sql
const (
	createTable = `
CREATE TABLE %[1]s(
	id     bigint unsigned primary key auto_increment,
    p_type VARCHAR(32),
    v0     VARCHAR(255),
    v1     VARCHAR(255),
    v2     VARCHAR(255),
    v3     VARCHAR(255),
    v4     VARCHAR(255),
    v5     VARCHAR(255)
);
CREATE INDEX idx_%[1]s ON %[1]s (p_type, v0, v1);`
	sqlTruncateTable = "TRUNCATE TABLE %s"
	sqlIsTableExist  = "SELECT 1 FROM %s"
	sqlInsertRow     = "INSERT INTO %s (p_type, v0, v1, v2, v3, v4, v5) VALUES (?, ?, ?, ?, ?, ?, ?)"
	sqlDeleteAll     = "DELETE FROM %s"
	sqlDeleteByArgs  = "DELETE FROM %s WHERE p_type = ?"
	sqlSelectAll     = "SELECT * FROM %s"
	sqlSelectWhere   = "SELECT * FROM %s WHERE "
)

// for Sqlite3
const (
	sqlCreateTableSqlite3 = `
CREATE TABLE IF NOT EXISTS %[1]s(
    p_type VARCHAR(32)  DEFAULT '' NOT NULL,
    v0     VARCHAR(255) DEFAULT '' NOT NULL,
    v1     VARCHAR(255) DEFAULT '' NOT NULL,
    v2     VARCHAR(255) DEFAULT '' NOT NULL,
    v3     VARCHAR(255) DEFAULT '' NOT NULL,
    v4     VARCHAR(255) DEFAULT '' NOT NULL,
    v5     VARCHAR(255) DEFAULT '' NOT NULL,
    CHECK (TYPEOF("p_type") = "text" AND
           LENGTH("p_type") <= 32),
    CHECK (TYPEOF("v0") = "text" AND
           LENGTH("v0") <= 255),
    CHECK (TYPEOF("v1") = "text" AND
           LENGTH("v1") <= 255),
    CHECK (TYPEOF("v2") = "text" AND
           LENGTH("v2") <= 255),
    CHECK (TYPEOF("v3") = "text" AND
           LENGTH("v3") <= 255),
    CHECK (TYPEOF("v4") = "text" AND
           LENGTH("v4") <= 255),
    CHECK (TYPEOF("v5") = "text" AND
           LENGTH("v5") <= 255)
);
CREATE INDEX IF NOT EXISTS idx_%[1]s ON %[1]s (p_type, v0, v1);`
	sqlTruncateTableSqlite3 = "DROP TABLE IF EXISTS %[1]s;" + sqlCreateTableSqlite3
)

// for Mysql
const (
	sqlCreateTableMysql = `
CREATE TABLE IF NOT EXISTS %[1]s(
    p_type VARCHAR(32)  DEFAULT '' NOT NULL,
    v0     VARCHAR(255) DEFAULT '' NOT NULL,
    v1     VARCHAR(255) DEFAULT '' NOT NULL,
    v2     VARCHAR(255) DEFAULT '' NOT NULL,
    v3     VARCHAR(255) DEFAULT '' NOT NULL,
    v4     VARCHAR(255) DEFAULT '' NOT NULL,
    v5     VARCHAR(255) DEFAULT '' NOT NULL,
    INDEX idx_%[1]s (p_type, v0, v1)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;`
)

// for Postgres
const (
	sqlCreateTablePostgres = `
CREATE TABLE IF NOT EXISTS %[1]s(
    p_type VARCHAR(32)  DEFAULT '' NOT NULL,
    v0     VARCHAR(255) DEFAULT '' NOT NULL,
    v1     VARCHAR(255) DEFAULT '' NOT NULL,
    v2     VARCHAR(255) DEFAULT '' NOT NULL,
    v3     VARCHAR(255) DEFAULT '' NOT NULL,
    v4     VARCHAR(255) DEFAULT '' NOT NULL,
    v5     VARCHAR(255) DEFAULT '' NOT NULL
);
CREATE INDEX IF NOT EXISTS idx_%[1]s ON %[1]s (p_type, v0, v1);`
	sqlInsertRowPostgres = "INSERT INTO %s (p_type, v0, v1, v2, v3, v4, v5) VALUES ($1, $2, $3, $4, $5, $6, $7)"
)

// for Sqlserver
const (
	sqlCreateTableSqlserver = `
CREATE TABLE %[1]s(
    p_type NVARCHAR(32)  DEFAULT '' NOT NULL,
    v0     NVARCHAR(255) DEFAULT '' NOT NULL,
    v1     NVARCHAR(255) DEFAULT '' NOT NULL,
    v2     NVARCHAR(255) DEFAULT '' NOT NULL,
    v3     NVARCHAR(255) DEFAULT '' NOT NULL,
    v4     NVARCHAR(255) DEFAULT '' NOT NULL,
    v5     NVARCHAR(255) DEFAULT '' NOT NULL
);
CREATE INDEX idx_%[1]s ON %[1]s (p_type, v0, v1);`
	sqlInsertRowSqlserver = "INSERT INTO %s (p_type, v0, v1, v2, v3, v4, v5) VALUES (@p1, @p2, @p3, @p4, @p5, @p6, @p7)"
)*/

